﻿#include "CmdLineChartDialogWaveformAnalysis.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdLineChartDialogWaveformAnalysis::CmdLineChartDialogWaveformAnalysis()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdLineChartDialogWaveformAnalysis::~CmdLineChartDialogWaveformAnalysis()
    {
    }

    bool CmdLineChartDialogWaveformAnalysis::execute()
    {
        bool _success = false;
        emit IBaseSignalInstance->signal_lineChartDialogWaveformAnalysis(
                m_graphName,
                m_cutOffFrequency,
                m_filterType,
                m_filterOrder,
                m_leftBoundary,
                m_rightBoundary,
                m_windowId,
                m_resultList,
                true
        );
        return true;
    }

    void CmdLineChartDialogWaveformAnalysis::undo()
    {
        // TODO: undo
    }

    void CmdLineChartDialogWaveformAnalysis::redo()
    {
        execute();
    }

} // namespace PostCommand
